<?php

namespace common\models\qywx;

use Yii;

/**
 * This is the model class for table "qywx_app".
 *
 * @property integer $qywx_app_id
 * @property string $qywx_app_name
 * @property string $qywx_app_corp_id
 * @property string $qywx_app_corp_secret
 * @property string $qywx_app_memo
 * @property string $qywx_app_created_by
 * @property string $qywx_app_created_at
 * @property string $qywx_app_updated_by
 * @property string $qywx_app_updated_at
 */
class QywxApp extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'qywx_app';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['qywx_app_corp_id', 'qywx_app_corp_secret'], 'required'],
            [['qywx_app_created_at', 'qywx_app_updated_at'], 'safe'],
            [['qywx_app_name', 'qywx_app_corp_id', 'qywx_app_corp_secret', 'qywx_app_memo'], 'string', 'max' => 255],
            [['qywx_app_created_by', 'qywx_app_updated_by'], 'string', 'max' => 45],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'qywx_app_id' => Yii::t('app', 'Qywx App ID'),
            'qywx_app_name' => Yii::t('app', 'Qywx App Name'),
            'qywx_app_corp_id' => Yii::t('app', 'Qywx App Corp ID'),
            'qywx_app_corp_secret' => Yii::t('app', 'Qywx App Corp Secret'),
            'qywx_app_memo' => Yii::t('app', 'Qywx App Memo'),
            'qywx_app_created_by' => Yii::t('app', 'Qywx App Created By'),
            'qywx_app_created_at' => Yii::t('app', 'Qywx App Created At'),
            'qywx_app_updated_by' => Yii::t('app', 'Qywx App Updated By'),
            'qywx_app_updated_at' => Yii::t('app', 'Qywx App Updated At'),
        ];
    }
}
